<% if $Items %>
    <% loop $Items %>
        <div class="fileupload fileupload-new" data-provides="fileupload">
            <div class="fileupload-new thumbnail" style="width: 80px; height: 60px;"><img src="$UploadFieldThumbnailURL" title="$Title" /></div>
            <div class="fileupload-preview fileupload-exists thumbnail" style="width: 80px; height: 60px;"></div>
            <% if Top.isDisabled || Top.isReadonly %>
            <% else %>
                <a href="$UploadFieldDeleteLink" class="btn fileupload-new delete-action btn-default"><%t FrontendImageField.ss.BUTTONDELETE "Delete" %></a>
            <% end_if %>
        </div>
    <% end_loop %>
<% end_if %>
<% if isDisabled || isReadonly %>
    <% if isSaveable %>
    <% else %>
        <div class="ss-uploadfield-item">
            <em><%t FrontendImageField.ATTACHONCESAVED2 "Files can be attached once you have saved the record for the first time." %></em>
        </div>
    <% end_if %>
<% else %>
    <% if $displayInput %>
        <div class="fileupload fileupload-new" data-provides="fileupload">
            <div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"><img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" /></div>
            <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>
            <div>
                <span class="btn btn-file btn-default"><span class="fileupload-new"><%t FrontendImageField.ss.SELECT_IMAGE "Select image" %></span><span class="fileupload-exists"><%t FrontendImageField.ss.CHANGE "Change" %></span><input id="$id" name="$getName" type="file"<% if $multiple %> multiple="multiple"<% end_if %> /></span>
                <a href="#" class="btn fileupload-exists btn-default" data-dismiss="fileupload"><%t FrontendImageField.ss.CLEAR "Clear" %></a> <% if not $isSaveable || $Record.exists %><a href="$uploadLink" class="btn fileupload-exists upload-action btn-default"><%t FrontendImageField.ss.BUTTONUPLOAD "Upload" %></a><% end_if %>
            </div>
        </div>
    <% end_if %>
<% end_if %>